package com.ikun.controller;

import com.ikun.pojo.Result;
import com.ikun.service.AlipayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;

@Controller
public class AlipayController {
    @Autowired
    AlipayService alipayServiceimpl;
    @ResponseBody
    @RequestMapping("trade_query")
    public Result trade_query(String no){
        System.out.println("no:"+no);
        return alipayServiceimpl.trade_query(no);
    }
    @ResponseBody
    @RequestMapping("trade_precreate")
    public Result trade_precreate(Long userId, BigDecimal money, HttpServletRequest request) throws Exception{
        System.out.println("id:"+userId);
        return alipayServiceimpl.trade_precreate(userId,money,request);
    }
}
